﻿#include "CmdImportProjectData.h"
#include <QFile>
#include <QDebug>
#include "BaseModule/IBaseSignal.h"
#include "PostCommandPy.h"

namespace PostCommand
{
    CmdImportProjectData::CmdImportProjectData()
        : CommandBase()
    {
        this->initCmdName();
    }
    CmdImportProjectData::~CmdImportProjectData()
    {
    }

    bool CmdImportProjectData::execute()
    {
        bool _success = false;
        QList<QString> filePaths = m_data.split(',');
        emit _success = IBaseSignalInstance->signal_importProjectData(filePaths);
        return _success;
    }

    void CmdImportProjectData::undo()
    {
        // TODO: undo
    }

    void CmdImportProjectData::redo()
    {
        execute();
    }

} // namespace PostCommand
